/*
 * FormAnalyzerInstance.h
 *
 *  Created on: 05/02/2009
 *      Author: Administrator
 */

#ifndef FORMANALYZERINSTANCE_H_
#define FORMANALYZERINSTANCE_H_

#include <QWidget>
#include <QVBoxLayout>

#include "FormFiller/FormFillerRegister.h"

class FormAnalyzerInstance : public QWidget
{
    Q_OBJECT

public:
	FormAnalyzerInstance::FormAnalyzerInstance(QWidget* parent, const QString& filename);

	friend QTextStream& operator<<(QTextStream& s, FormFillerRegister& r);
	friend QTextStream& operator>>(QTextStream& s, FormFillerRegister& r);

	bool isNew(void){return isNewV;}

	void load(void);
	void loadTald(const QString& talf);

	void save(void);
	void saveAs(const QString& filename);
	bool close(void);
	void selectReg(unsigned int index);

	int numberOfRegisters();
	void addRegister();

private:

	bool isNewV;
	FormFillerRegister sample;
	QVBoxLayout* layout;

};

#endif /* FORMANALYZERINSTANCE_H_ */
